from django.contrib import admin
from .models import SignIn,Tinfo,Course,Stucourse,Grade,Verify,Gonggao,Teaproc,Stuproc,Sinfo
# Register your models here.

class SignInAdmin(admin.ModelAdmin):
    list_per_page = 5
    list_display = ['id']
    search_fields = ['id']
admin.site.register(SignIn,SignInAdmin)

class SinfoAdmin(admin.ModelAdmin):
    list_per_page = 5
    list_display = ['snum','sname']
    search_fields = ['snum']

admin.site.register(Sinfo, SinfoAdmin)


class TinfoAdmin(admin.ModelAdmin):
    list_per_page = 5
    list_display = ['id','tname']

admin.site.register(Tinfo,TinfoAdmin)

class CourseAdmin(admin.ModelAdmin):
    list_per_page = 5
    list_display = ['id','cname']
admin.site.register(Course,CourseAdmin)

class StucourseAdmin(admin.ModelAdmin):
    list_per_page = 5
    list_display = ['snum','cnum']
admin.site.register(Stucourse,StucourseAdmin)

class VerifyAdmin(admin.ModelAdmin):
    list_per_page = 5
    list_display = ['cnm_id','teaname']
admin.site.register(Verify,VerifyAdmin)

class GradeAdmin(admin.ModelAdmin):
    list_per_page = 5
    list_display = ['cname','snum','sname']
admin.site.register(Grade,GradeAdmin)

class TeaprocAdmin(admin.ModelAdmin):
    list_per_page = 5
    list_display = ['cnum_id','cnum','week','part','pos']
admin.site.register(Teaproc,TeaprocAdmin)

class StuprocAdmin(admin.ModelAdmin):
    list_per_page = 5
    list_display = ['snum','pid']
admin.site.register(Stuproc,StuprocAdmin)

class GonggaoAdmin(admin.ModelAdmin):
    list_per_page = 5
    list_display = ['gtopic','gtime']
admin.site.register(Gonggao,GonggaoAdmin)

